<div class="box box-maxbid">
	<div class="box-header">
		<h3 class="box-title">Arrematantes Pessoa Jurídica</h3>
	</div><!-- /.box-header -->
	<!-- form start -->

	<div class="overlay" ng-show="hideform"></div>
	<div class="loading-img" ng-show="hideform"></div>

	<form role="form" name="ArrematanteForm" >
		<div class="box-body">
			<div class="form-group row">
				<div class="col-md-6 col-xs-6">
					<label for="InputTipo" >RAZÃO SOCIAL</label>
					<input ng-model="arrematante.NOME" name="NOME"
					required  class="form-control"/>
					<div class="messages-alert" ng-show="ArrematanteForm.NOME.$dirty && ArrematanteForm.NOME.$invalid">
						<span ng-show="ArrematanteForm.NOME.$error.required">* Campo requerido</span>
					</div>
				</div>
				<div class="col-md-6 col-xs-6">
					<label for="InputTipo" >NOME FANTASIA</label>
					<input ng-model="arrematante.NOME_FANTASICA" name="NOME_FANTASICA"
					class="form-control"/>
					
				</div>
				
			</div>
			<div class="form-group row">
				<div class="col-md-3 col-xs-4">
					<label for="InputTipo" >CNPJ</label>
					<input ng-model="arrematante.CPF_CNPJ" name="CPF_CNPJ"
					class="form-control"
					ui-mask="99.999.999/9999-99"
					maxlength="18"
					required
					/>
					<div class="messages-alert" ng-show="ArrematanteForm.CPF_CNPJ.$dirty && ArrematanteForm.CPF_CNPJ.$invalid">
						<span ng-show="ArrematanteForm.CPF_CNPJ.$error.required"> * Campo requerido</span>
					</div>
				</div>
				<div class="col-md-3 col-xs-4">
					<label for="InputTipo" >IE</label>
					<input ng-model="arrematante.RG_IE" name="RG_IE"
					class="form-control"
				     maxlength="16"

					/>

				</div>
				
				<div class="col-md-2 col-xs-3">
					<label for="InputTel" >TELEFONE</label>
					<input ng-model="arrematante.TELEFONE" name="TELEFONE"
					class="form-control"
					ui-mask="(99)9999-9999"
					required
					/>
				</div>
				<div class="col-md-2 col-xs-3">
					<label for="InputTel" >TELEFONE 2</label>
					<input ng-model="arrematante.TELEFONE_2" name="TELEFONE_2"
					class="form-control"
					ui-mask="(99)9999-9999"

					/>
				</div>
				<div class="col-md-2 col-xs-3">
					<label for="InputTel" >CELULAR</label>
					<input ng-model="arrematante.CELULAR" name="CELULAR"
					class="form-control"
					ui-mask="(99)99999-9999"

					/>
				</div>

			</div>
			
			<div class="form-group row">
				<div class="col-md-3 col-xs-5">
					<label for="InputTipo" >CONTATO</label>
					<input ng-model="arrematante.CONTATO" name="CONTATO"
					required  class="form-control"/>
					<div class="messages-alert" ng-show="ArrematanteForm.CONTATO.$dirty && ArrematanteForm.CONTATO.$invalid">
						<span ng-show="ArrematanteForm.CONTATO.$error.required">* Campo requerido</span>
					</div>
				</div>
				<div class="col-md-3 col-xs-5">
					<label for="InputTipo" >CPF CONTATO</label>
					<input ng-model="arrematante.CPF_CONTATO" name="CPF_CONTATO"
					required  class="form-control"/>
					<div class="messages-alert" ng-show="ArrematanteForm.CPF_CONTATO.$dirty && ArrematanteForm.CPF_CONTATO.$invalid">
						<span ng-show="ArrematanteForm.CPF_CONTATO.$error.required">* Campo requerido</span>
					</div>
				</div>
				
				</div>
			
			<div class="form-group row">
				<div class="col-md-6 col-xs-6">
					<label for="InputTipo" >EMAIL</label>
					<input type="email" ng-model="arrematante.EMAIL" name="EMAIL"
					class="form-control"

					required
					/>
					<div class="messages-alert" ng-show="ArrematanteForm.EMAIL.$dirty && ArrematanteForm.EMAIL.$invalid">
						<span ng-show="ArrematanteForm.EMAIL.$error.required"> * Campo requerido</span>
					</div>
				</div>
				<div class="col-md-6 col-xs-6">
					<label for="InputTipo" >EMAIL CONTATO</label>
					<input  type="email" ng-model="arrematante.EMAIL_ALTERNATIVO" name="EMAIL_ALTERNATIVO"
					class="form-control"
					/>
				</div>

			</div>
			<hr/>
			<div class="form-group row">
				<div class="col-md-2 col-xs-3">
					<label for="InputTipo" >CEP</label>
					<input ng-model="arrematante.CEP" name="CEP"
					class="form-control"
					ng-change="setLogradouro()"
					ui-mask="99999-999"
					/>

				</div>
				<div class="col-md-5 col-xs-8">
					<label for="InputTipo" >Logradouro</label>
					<input ng-model="arrematante.LOGRADOURO" name="LOGRADOURO"
					class="form-control disabled"
					maxlength="15"
					disabled="true"
					/>
				</div>
				<div class="col-md-1 col-xs-2">
					<label for="InputTipo" >Numero</label>
					<input ng-model="arrematante.NUMERO" name="NUMERO"
					class="form-control "
					maxlength="10"

					/>
				</div>
				<div class="col-md-2 col-xs-3">
					<label for="InputTipo" >Complemento</label>
					<input ng-model="arrematante.COMPLEMENTO" name="COMPLEMENTO"
					class="form-control "
					maxlength="10"

					/>
				</div>

			</div>

			<div class="form-group row">
				<div class="col-md-3 col-xs-4">
					<label for="InputTipo" >Bairro</label>
					<input ng-model="arrematante.BAIRRO" name="BAIRRO"
					class="form-control"
					disabled="true"
					/>

				</div>
				<div class="col-md-3 col-xs-4">
					<label for="InputTipo" >Cidade</label>
					<input ng-model="arrematante.CIDADE" name="CIDADE"
					class="form-control"
					maxlength="20"
					disabled="true"
					/>
				</div>
				<div class="col-md-1 col-xs-2">
					<label for="InputTipo" >Estado</label>
					<input ng-model="arrematante.UF" name="UF"
					class="form-control "
					maxlength="10"
					disabled="true"

					/>
				</div>

			</div>
			

						<hr/>
			<div class="form-group row">

				<div class="col-md-3 col-xs-4">
					<label for="InputLogin">LOGIN</label> <input name="LOGIN"
						ng-model="arrematante.LOGIN" class="form-control" placeholder="Login"
						ng-minlength="6" ng-maxlength="16" maxlength="16"
						ng-pattern="/^[a-zA-Z0-9\_]+$/" autocomplete="off">

					<div class="messages-alert"
						ng-show="ArrematanteForm.LOGIN.$dirty && ArrematanteForm.LOGIN.$invalid">
						<span ng-show="ArrematanteForm.LOGIN.$error.required">* Campo &eacute;
							obrigat&oacute;rio</span>
							 <span
							ng-show="ArrematanteForm.LOGIN.$error.pattern"> * Caracter não permitido
						</span> <span ng-show="ArrematanteForm.LOGIN.$error.minlength"> * minimo
							de 6 caracteres </span> <span
							ng-show="ArrematanteForm.LOGIN.$error.maxlength"> * máximo de 16
							caracteres </span>
					</div>
				</div>
				<div class="col-md-3 col-xs-4">
					<label for="InputPwd">SENHA </label> 
					
					<input type="password" ng-if="add"
						name="PWD" class="form-control" ng-model="arrematante.PWD"
						ng-minlength="6" required ng-maxlength="16" />
									<input type="password" ng-if="edit"
						name="PWD" class="form-control" ng-model="arrematante.PWD"
						ng-minlength="6" ng-maxlength="16" />
					<div class="messages-alert"
						ng-show="ArrematanteForm.PWD.$dirty && ArrematanteForm.PWD.$invalid">
						<span ng-show="ArrematanteForm.PWD.$error.required">* Campo &eacute;
							obrigat&oacute;rio</span> <span
							ng-show="ArrematanteForm.PWD.$error.minlength">* O m&iacute;ximo de
							caracteres permitido &eacute; 6</span> <span
							ng-show="ArrematanteForm.PWD.$error.maxlength">* O m&aacute;ximo de
							caracteres permitido &eacute; 16</span>


					</div>
				</div>
				<div class="col-md-3 col-xs-4">
					<label for="InputConfirmPwd">CONFIRMAR SENHA </label> 
					<input
						ng-if="add" type="password" name="confirmPwd" class="form-control"
						ng-model="arrematante.confirmPwd" required is-equals="[name=PWD]" />
                                                             						
 						<input
						ng-if="edit" type="password" name="confirmPwd"
						class="form-control" ng-model="arrematante.confirmPwd"
						is-equals="[name=PWD]" />
					<div class="messages-alert"
						ng-show="ArrematanteForm.confirmPwd.$dirty && ArrematanteForm.confirmPwd.$invalid">
						<!-- <span ng-show="ArrematanteForm.confirmPwd.$error.required">* Campo &eacute; obrigat&oacute;rio<br/></span>
                       -->
						<span ng-show="ArrematanteForm.confirmPwd.$error.isequals">* A
							confirma&ccedil;&otilde;o de senha n&atilde;o &eacute; igual
							senha </span>

					</div>
				</div>

			</div>
			
			
			

		</div><!-- /.box-body -->

		<div class="box-footer">
			<button type="submit" ng-click="save()" ng-disabled="ArrematanteForm.$invalid" class="btn btn-primary">
				Salvar
			</button>
			<button type="submit" ng-click="save('true')"  ng-disabled="ArrematanteForm.$invalid" class="btn btn-primary">
				Salvar e Listar
			</button>
			<a ng-hide="hideButtonCancel" href="#/buyers/add" class="btn btn-danger"><i class="fa fa-ban"></i> Cancelar</a>
			<a href="#/buyers" class="btn btn-danger">Listar</a>
			<span class="separator"></span>
		</div>
	</form>
</div><!-- /.box -->

